/*import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Scanner;

public class MultiChoiceTest {

	Scanner scanner = new Scanner(System.in);
	ArrayList<String> multichoice = new ArrayList<String>();
	Vocabulary voca = new Vocabulary();
	int score;
	BufferedReader br;
	Rank rank = new Rank();
	User user = new User();

	public void multiChoiceTest(int day, int level) {

		try {

			int multi_answer = 0;
			String line = "";
			BufferedReader br = null;
			if (level == 3)
				br = new BufferedReader(new FileReader("high.txt"));
			if (level == 2)
				br = new BufferedReader(new FileReader("mid.txt"));
			if (level == 1)
				br = new BufferedReader(new FileReader("low.txt"));
			while ((line = br.readLine()) != null) {
				String test[] = new String[4];
				test = line.split("/");
				if (test[0].equals(Integer.toString(day))) {

					int correct_answer = (int) ((Math.random() * 4) + 1);
					int m[] = new int[3];
					for (int j = 0; j < 3; j++) {

						m[j] = (int) ((int) ((day) - 1) * 10 + ((Math.random() * 10) + 1));
						while (m[j] == Integer.parseInt(test[3])) {
							m[j] = (int) ((int) ((day) - 1) * 10 + ((Math
									.random() * 10) + 1));
						}

						for (int k = 0; k < j; k++) {
							if (m[j] == m[k]) {
								j--;
								break;
							}
						}
					}

					System.out.println("Qestion" + " : " + test[1]);
					this.makemultichoice(correct_answer, test[2], m, day, level);
					System.out.print(" Answer : ");
					multi_answer = scanner.nextInt();

					if (multi_answer == correct_answer)
						score++;
					else
						voca.enroll(user.getName(), level, test[1], test[2]);
				}

			}
			System.out.println("Your score is " + score);
			rank.enroll(user.getName(), level, day, score);
			br.close();
		} catch (IOException e) {
			e.printStackTrace();
		}

	}

	public void multiChoiceTest(int start, int finish, int level) {
		int number[] = new int[10];
		for (int i = 0; i < 10; i++) {

			number[i] = (int) ((Math.random() * (finish - start + 1) * 10))
					+ (start - 1) * 10 + 1;

			for (int j = 0; j < i; j++) {
				if (number[i] == number[j]) {
					i--;
					break;
				}
			}
		}

		try {

			int multi_answer = 0;
			String line = "";
			BufferedReader br = null;
			if (level == 3)
				br = new BufferedReader(new FileReader("high.txt"));
			if (level == 2)
				br = new BufferedReader(new FileReader("mid.txt"));
			if (level == 1)
				br = new BufferedReader(new FileReader("low.txt"));
			while ((line = br.readLine()) != null) {
				String test[] = new String[4];
				test = line.split("/");
				for (int k = 0; k < 10; k++) {
					if (test[3].equals(Integer.toString(number[k]))) {

						int correct_answer = (int) ((Math.random() * 4) + 1);
						int m[] = new int[3];
						for (int a = 0; a < 3; a++) {

							m[a] = (int) ((Math.random() * (finish - start + 1) * 10))
									+ (start - 1) * 10 + 1;
							while (m[a] == number[0]) {
								m[a] = (int) ((Math.random()
										* (finish - start + 1) * 10))
										+ (start - 1) * 10 + 1;
							}

							for (int b = 0; b < a; b++) {
								if (m[a] == m[b]) {
									a--;
									break;
								}
							}
						}

						System.out.println("Qestion" + " : " + test[1]);
						this.makemultichoice(correct_answer, test[2], m,
								Integer.toString(number[k]), level);
						System.out.print(" Answer : ");
						multi_answer = scanner.nextInt();

						if (multi_answer == correct_answer)
							score++;
						else
							voca.enroll(user.getName(), level, test[1], test[2]);

					}
				}
			}
			System.out.println("Your score is " + score);
			rank.enroll(user.getName(), level, start, finish, score);
			br.close();
		} catch (IOException e) {
			e.printStackTrace();
		}

	}

	public void makemultichoice(int correct_answer, String correct, int m[],
			int day, int level) throws IOException {

		if ((correct_answer) == 1) {
			multichoice.add(correct);
			multichoice.add("");
			multichoice.add("");
			multichoice.add("");

		}

		if ((correct_answer) == 2) {
			multichoice.add("");
			multichoice.add(correct);
			multichoice.add("");
			multichoice.add("");

		}

		if ((correct_answer) == 3) {

			multichoice.add("");
			multichoice.add("");
			multichoice.add(correct);
			multichoice.add("");

		}

		if ((correct_answer) == 4) {

			multichoice.add("");
			multichoice.add("");
			multichoice.add("");
			multichoice.add(correct);
		}

		BufferedReader br2 = null;
		String line2 = "";
		if (level == 3)
			br2 = new BufferedReader(new FileReader("high.txt"));
		if (level == 2)
			br2 = new BufferedReader(new FileReader("mid.txt"));
		if (level == 1)
			br2 = new BufferedReader(new FileReader("low.txt"));
		while ((line2 = br2.readLine()) != null) {

			String test2[] = line2.split("/");
			if (test2[0].equals(Integer.toString(day))) {
				if (correct_answer == 1) {
					if (test2[3].equals(Integer.toString(m[0])))
						if (multichoice.get(1) == "")
							multichoice.set(1, test2[2]);
						else if (multichoice.get(2) != ""
								&& multichoice.get(3) != "")
							break;
					if (test2[3].equals(Integer.toString(m[1])))
						if (multichoice.get(2) == "")
							multichoice.set(2, test2[2]);
						else if (multichoice.get(1) != ""
								&& multichoice.get(3) != "")
							break;
					if (test2[3].equals(Integer.toString(m[2])))
						if (multichoice.get(3) == "")
							multichoice.set(3, test2[2]);
						else if (multichoice.get(1) != ""
								&& multichoice.get(2) != "")
							break;
				}

				if (correct_answer == 2) {
					if (test2[3].equals(Integer.toString(m[0])))
						if (multichoice.get(0) == "")
							multichoice.set(0, test2[2]);
						else if (multichoice.get(2) != ""
								&& multichoice.get(3) != "")
							break;
					if (test2[3].equals(Integer.toString(m[1])))
						if (multichoice.get(2) == "")
							multichoice.set(2, test2[2]);
						else if (multichoice.get(0) != ""
								&& multichoice.get(3) != "")
							break;
					if (test2[3].equals(Integer.toString(m[2])))
						if (multichoice.get(3) == "")
							multichoice.set(3, test2[2]);
						else if (multichoice.get(0) != ""
								&& multichoice.get(2) != "")
							break;
				}

				if (correct_answer == 3) {
					if (test2[3].equals(Integer.toString(m[0])))
						if (multichoice.get(0) == "")
							multichoice.set(0, test2[2]);
						else if (multichoice.get(1) != ""
								&& multichoice.get(3) != "")
							break;
					if (test2[3].equals(Integer.toString(m[1])))
						if (multichoice.get(1) == "")
							multichoice.set(1, test2[2]);
						else if (multichoice.get(0) != ""
								&& multichoice.get(3) != "")
							break;
					if (test2[3].equals(Integer.toString(m[2])))
						if (multichoice.get(3) == "")
							multichoice.set(3, test2[2]);
						else if (multichoice.get(0) != ""
								&& multichoice.get(1) != "")
							break;
				}

				if (correct_answer == 4) {
					if (test2[3].equals(Integer.toString(m[0])))
						if (multichoice.get(0) == "")
							multichoice.set(0, test2[2]);
						else if (multichoice.get(1) != ""
								&& multichoice.get(2) != "")
							break;
					if (test2[3].equals(Integer.toString(m[1])))
						if (multichoice.get(1) == "")
							multichoice.set(1, test2[2]);
						else if (multichoice.get(0) != ""
								&& multichoice.get(2) != "")
							break;
					if (test2[3].equals(Integer.toString(m[2])))
						if (multichoice.get(2) == "")
							multichoice.set(2, test2[2]);
						else if (multichoice.get(0) != ""
								&& multichoice.get(1) != "")
							break;
				}

			}
		}

		System.out.print("1." + multichoice.get(0) + " 2. "
				+ multichoice.get(1) + " 3. " + multichoice.get(2) + " 4. "
				+ multichoice.get(3));
		multichoice.clear();
	}

	public void makemultichoice(int correct_answer, String correct, int m[],
			String number, int level) throws IOException {

		BufferedReader br2 = null;

		if ((correct_answer) == 1) {
			multichoice.add(correct);
			multichoice.add("");
			multichoice.add("");
			multichoice.add("");

		}

		if ((correct_answer) == 2) {
			multichoice.add("");
			multichoice.add(correct);
			multichoice.add("");
			multichoice.add("");

		}

		if ((correct_answer) == 3) {

			multichoice.add("");
			multichoice.add("");
			multichoice.add(correct);
			multichoice.add("");

		}

		if ((correct_answer) == 4) {

			multichoice.add("");
			multichoice.add("");
			multichoice.add("");
			multichoice.add(correct);
		}

		String line2 = "";

		if (level == 3)
			br2 = new BufferedReader(new FileReader("high.txt"));
		if (level == 2)
			br2 = new BufferedReader(new FileReader("mid.txt"));
		if (level == 1)
			br2 = new BufferedReader(new FileReader("low.txt"));

		while ((line2 = br2.readLine()) != null) {

			String test2[] = line2.split("/");
			if (test2[3] == number) {
				if (correct_answer == 1) {
					if (test2[3].equals(Integer.toString(m[0])))
						if (multichoice.get(1) == "")
							multichoice.set(1, test2[2]);
						else if (multichoice.get(2) != ""
								&& multichoice.get(3) != "")
							break;
					if (test2[3].equals(Integer.toString(m[1])))
						if (multichoice.get(2) == "")
							multichoice.set(2, test2[2]);
						else if (multichoice.get(1) != ""
								&& multichoice.get(3) != "")
							break;
					if (test2[3].equals(Integer.toString(m[2])))
						if (multichoice.get(3) == "")
							multichoice.set(3, test2[2]);
						else if (multichoice.get(1) != ""
								&& multichoice.get(2) != "")
							break;
				}

				if (correct_answer == 2) {
					if (test2[3].equals(Integer.toString(m[0])))
						if (multichoice.get(0) == "")
							multichoice.set(0, test2[2]);
						else if (multichoice.get(2) != ""
								&& multichoice.get(3) != "")
							break;
					if (test2[3].equals(Integer.toString(m[1])))
						if (multichoice.get(2) == "")
							multichoice.set(2, test2[2]);
						else if (multichoice.get(0) != ""
								&& multichoice.get(3) != "")
							break;
					if (test2[3].equals(Integer.toString(m[2])))
						if (multichoice.get(3) == "")
							multichoice.set(3, test2[2]);
						else if (multichoice.get(0) != ""
								&& multichoice.get(2) != "")
							break;
				}

				if (correct_answer == 3) {
					if (test2[3].equals(Integer.toString(m[0])))
						if (multichoice.get(0) == "")
							multichoice.set(0, test2[2]);
						else if (multichoice.get(1) != ""
								&& multichoice.get(3) != "")
							break;
					if (test2[3].equals(Integer.toString(m[1])))
						if (multichoice.get(1) == "")
							multichoice.set(1, test2[2]);
						else if (multichoice.get(0) != ""
								&& multichoice.get(3) != "")
							break;
					if (test2[3].equals(Integer.toString(m[2])))
						if (multichoice.get(3) == "")
							multichoice.set(3, test2[2]);
						else if (multichoice.get(0) != ""
								&& multichoice.get(1) != "")
							break;
				}

				if (correct_answer == 4) {
					if (test2[3].equals(Integer.toString(m[0])))
						if (multichoice.get(0) == "")
							multichoice.set(0, test2[2]);
						else if (multichoice.get(1) != ""
								&& multichoice.get(2) != "")
							break;
					if (test2[3].equals(Integer.toString(m[1])))
						if (multichoice.get(1) == "")
							multichoice.set(1, test2[2]);
						else if (multichoice.get(0) != ""
								&& multichoice.get(2) != "")
							break;
					if (test2[3].equals(Integer.toString(m[2])))
						if (multichoice.get(2) == "")
							multichoice.set(2, test2[2]);
						else if (multichoice.get(0) != ""
								&& multichoice.get(1) != "")
							break;
				}

			}
		}

		System.out.print("1." + multichoice.get(0) + " 2. "
				+ multichoice.get(1) + " 3. " + multichoice.get(2) + " 4. "
				+ multichoice.get(3));
		multichoice.clear();
	}

}*/
